home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume5 / tess / patch2 < prev   
Encoding:
Internet Message Format  |  1988-12-20  |  3.5 KB

  1. Path: uunet!tektronix!tekgen!tekred!games
  2. From: games@tekred.TEK.COM
  3. Newsgroups: comp.sources.games
  4. Subject: v05i098:  tess - beyond the tesseract, an abstract adventure game, Patch2
  5. Message-ID: <3399@tekred.TEK.COM>
  6. Date: 20 Dec 88 16:51:40 GMT
  7. Sender: billr@tekred.TEK.COM
  8. Lines: 117
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted by: Viola lee <viola@idacom.cs.ubc.ca>
  12. Comp.sources.games: Volume 5, Issue 98
  13. Archive-name: tess/Patch2
  14.  
  15. [If you have an uptodate version of patch, you can feed this article
  16.  to it directly, along with specifing your tess source directory.  -br]
  17.  
  18. [[Here are a couple of patches to help "tess" compile under UNIX System V.
  19. Basically, they get around the lack of the gettimeofday() call, using
  20. the localtime() call instead.  It also makes it use the better random
  21. number routines in System V.
  22. These patches are courtesy of:
  23.         Dave Yearke, Sigma Systems Technology, Inc.
  24.            5813 Main St, Williamsville, NY 14221
  25.                   ...!sunybcs!sigmast!dgy]]
  26.  
  27. #! /bin/sh
  28. # This is a shell archive.  Remove anything before this line, then unpack
  29. # it by saving it into a file and typing "sh file".  To overwrite existing
  30. # files, type "sh file -c".  You can also feed this as standard input via
  31. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  32. # will see the following message at the end:
  33. #        "End of shell archive."
  34. # Contents:  patches02
  35. # Wrapped by billr@saab on Tue Dec 20 08:54:37 1988
  36. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  37. if test -f 'patches02' -a "${1}" != "-c" ; then 
  38.   echo shar: Will not clobber existing file \"'patches02'\"
  39. else
  40. echo shar: Extracting \"'patches02'\" \(1619 characters\)
  41. sed "s/^X//" >'patches02' <<'END_OF_FILE'
  42. X*** tess.c.sav    Sat Dec 17 09:00:35 1988
  43. X--- tess.c    Sat Dec 17 09:20:54 1988
  44. X***************
  45. X*** 87,93 ****
  46. X--- 87,98 ----
  47. X  
  48. X  #include "tess-def.c"
  49. X  #include "parser.c"
  50. X+ #ifdef SYSV
  51. X+ #include <sys/types.h>
  52. X+ #include <time.h>
  53. X+ #else /* !SYSV */
  54. X  #include <sys/time.h>
  55. X+ #endif /* !SYSV */
  56. X  
  57. X  
  58. X  /*------------------------------------------------------------*/
  59. X***************
  60. X*** 126,133 ****
  61. X--- 131,143 ----
  62. X  InitAdv()
  63. X  {
  64. X    int i;
  65. X+ #ifdef SYSV
  66. X+   time_t now;
  67. X+   struct tm *tp;
  68. X+ #else /* !SYSV */
  69. X    struct timeval tp;
  70. X    struct timezone tzp;
  71. X+ #endif /* !SYSV */
  72. X  
  73. X    for ( i=1; i<MaxObjs; i++ )
  74. X    {
  75. X***************
  76. X*** 143,155 ****
  77. X--- 153,176 ----
  78. X  
  79. X    zap = cc = wa = ep = dr = af = gp = mi = ti = kp = 0;
  80. X  
  81. X+ #ifdef SYSV
  82. X+   time(&now);
  83. X+   if ((tp = localtime(&now))==NULL) {
  84. X+ #else /* !SYSV */
  85. X    if (gettimeofday(&tp,&tzp)==-1) {
  86. X+ #endif /* !SYSV */
  87. X      perror("gettimeofday");
  88. X      exit(1);
  89. X    }
  90. X+ #ifdef SYSV
  91. X+   (void)srand48 ((long)tp->tm_sec);
  92. X+   for ( sum=0, i=0; i<3; i++ )
  93. X+     sum += (dc [i] = drand48() & 31);
  94. X+ #else /* !SYSV */
  95. X    (void)srand ((int)tp.tv_sec);
  96. X    for ( sum=0, i=0; i<3; i++ )
  97. X      sum += (dc [i] = rand() & 31);
  98. X+ #endif /* !SYSV */
  99. X  
  100. X    print_room = 1;
  101. X  }
  102. X*** Makefile.orig    Tue Nov 29 17:26:32 1988
  103. X--- Makefile    Tue Dec 20 08:52:26 1988
  104. X***************
  105. X*** 1,6 ****
  106. X  # simple makefile for tess
  107. X  
  108. X! CFLAGS = -O
  109. X  
  110. X  tess: tess.c tess-def.c parser.c
  111. X      cc -o tess $(CFLAGS) tess.c
  112. X--- 1,7 ----
  113. X  # simple makefile for tess
  114. X  
  115. X! DEFINES = #-DSYSV
  116. X! CFLAGS = -O $(DEFINES)
  117. X  
  118. X  tess: tess.c tess-def.c parser.c
  119. X      cc -o tess $(CFLAGS) tess.c
  120. END_OF_FILE
  121. if test 1619 -ne `wc -c <'patches02'`; then
  122.     echo shar: \"'patches02'\" unpacked with wrong size!
  123. fi
  124. # end of 'patches02'
  125. fi
  126. echo shar: End of shell archive.
  127. exit 0
  128.